<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>WLog: WLogInterface.h源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- 制作者 Doxygen 1.5.8 -->
<script type="text/javascript">
<!--
function changeDisplayState (e){
  var num=this.id.replace(/[^[0-9]/g,'');
  var button=this.firstChild;
  var sectionDiv=document.getElementById('dynsection'+num);
  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
    sectionDiv.style.display='block';
    button.src='open.gif';
  }else{
    sectionDiv.style.display='none';
    button.src='closed.gif';
  }
}
function initDynSections(){
  var divs=document.getElementsByTagName('div');
  var sectionCounter=1;
  for(var i=0;i<divs.length-1;i++){
    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
      var header=divs[i];
      var section=divs[i+1];
      var button=header.firstChild;
      if (button!='IMG'){
        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
        button=document.createElement('img');
        divs[i].insertBefore(button,divs[i].firstChild);
      }
      header.style.cursor='pointer';
      header.onclick=changeDisplayState;
      header.id='dynheader'+sectionCounter;
      button.src='closed.gif';
      section.id='dynsection'+sectionCounter;
      section.style.display='none';
      section.style.marginLeft='14px';
      sectionCounter++;
    }
  }
}
window.onload = initDynSections;
-->
</script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="namespaces.html"><span>名字空间</span></a></li>
      <li><a href="annotated.html"><span>类</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>文件成员</span></a></li>
    </ul>
  </div>
<h1>WLogInterface.h</h1><a href="WLogInterface_8h.html">浏览该文件的文档。</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef _WLOG_WLOGINTERFACE_H_</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define _WLOG_WLOGINTERFACE_H_</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include "<a class="code" href="OS_8h.html">OS.h</a>"</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include "<a class="code" href="ILogProcess_8h.html">ILogProcess.h</a>"</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include "<a class="code" href="IOuter_8h.html">IOuter.h</a>"</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include "<a class="code" href="Record_8h.html">Record.h</a>"</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include "<a class="code" href="RegularOuter_8h.html">RegularOuter.h</a>"</span>
<a name="l00009"></a>00009 <span class="preprocessor">#include "<a class="code" href="XmlOuter_8h.html">XmlOuter.h</a>"</span>
<a name="l00010"></a>00010 <span class="preprocessor">#include "<a class="code" href="ILevel_8h.html">ILevel.h</a>"</span>
<a name="l00011"></a>00011 <span class="preprocessor">#include "<a class="code" href="Common_8h.html">Common.h</a>"</span>
<a name="l00012"></a>00012 <span class="preprocessor">#include "<a class="code" href="WLDefine_8h.html">WLDefine.h</a>"</span>
<a name="l00013"></a>00013 <span class="preprocessor">#include "<a class="code" href="BlockOuter_8h.html">BlockOuter.h</a>"</span>
<a name="l00014"></a>00014 
<a name="l00015"></a>00015 <span class="keyword">namespace </span>WLog
<a name="l00016"></a>00016 {
<a name="l00020"></a>00020     <span class="keyword">extern</span> ILogProcess* <a class="code" href="namespaceWLog.html#13b8ff10caf2fabc88a615041f44d6fa" title="全局变量 ILogProcess 指针,使得所有的log操作都使用一个实例">log</a>;
<a name="l00021"></a>00021 
<a name="l00027"></a>00027     ILogProcess* <a class="code" href="namespaceWLog.html#4c90989d4645c6ecd9d9113c3dc64fcd" title="设置log指针.">setLog</a>(ILogProcess* pLog);
<a name="l00028"></a>00028 
<a name="l00033"></a>00033     ILogProcess* <a class="code" href="namespaceWLog.html#88d869c121c4e8992922002033ac06c6" title="获取log指针.">getLog</a>();
<a name="l00034"></a>00034     
<a name="l00042"></a>00042     IOuter* <a class="code" href="namespaceWLog.html#251ca1d97c3062af94fc5471724dd6a1" title="设置log的输出outer指针.">setOuter</a>(IOuter *pOuter);
<a name="l00043"></a>00043 
<a name="l00053"></a>00053     ILogProcess* <a class="code" href="namespaceWLog.html#620aeb437d19cc9051eba3c2b1cfbc03" title="设置log与log的outer指针.">setOuterLog</a>(IOuter *pOuter, ILogProcess* pLog);
<a name="l00054"></a>00054 
<a name="l00060"></a>00060     <span class="keywordtype">bool</span> <a class="code" href="namespaceWLog.html#121adb4c1a83fb9272cc01323d4da656" title="设置log的输出级别.">setOutLevel</a>(<span class="keywordtype">int</span> iOutLevel = <a class="code" href="WLDefine_8h.html#ceacf3da21ef098182fce735e4cd8dfa">W_LEVEL_FLOOR</a>);
<a name="l00061"></a>00061 
<a name="l00067"></a>00067     <span class="keywordtype">bool</span> <a class="code" href="namespaceWLog.html#14984727b0b46ea36398e5ebac29ef56" title="设置输出日志中，是否只保留文件名，而不要路径.">setTrimFileName</a>(<span class="keywordtype">bool</span> bTrim);
<a name="l00068"></a>00068     
<a name="l00077"></a>00077     <span class="keywordtype">string</span> <a class="code" href="namespaceWLog.html#157286d8013463871f20a6bfb039cac1" title="以当前的时间创建文件名">buildFileNameNow</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* szPrefix = <span class="stringliteral">""</span>, <span class="keyword">const</span> <span class="keywordtype">char</span>* szEnd = <span class="stringliteral">".log"</span>, <span class="keyword">const</span> <span class="keywordtype">char</span>* szFormatDateTime = <span class="stringliteral">"%Y-%m-%d_%H%M%S"</span>);
<a name="l00078"></a>00078 
<a name="l00079"></a><a class="code" href="WLogInterface_8h.html#2526a8fa89c481f1f1b6f21c4957345a">00079</a> <span class="preprocessor">    #define trace WLog::Record(W_LEVEL_TRACE, __LINE__, _FUNCTION_NAME_, __FILE__)</span>
<a name="l00080"></a><a class="code" href="WLogInterface_8h.html#07b32b3e4728b7d10b82d882268e96fa">00080</a> <span class="preprocessor"></span><span class="preprocessor">    #define info WLog::Record(W_LEVEL_INFO, __LINE__, _FUNCTION_NAME_, __FILE__)</span>
<a name="l00081"></a><a class="code" href="WLogInterface_8h.html#322565ccf348d13e4d3de13af771e5fc">00081</a> <span class="preprocessor"></span><span class="preprocessor">    #define debug WLog::Record(W_LEVEL_DEBUG, __LINE__, _FUNCTION_NAME_, __FILE__)</span>
<a name="l00082"></a><a class="code" href="WLogInterface_8h.html#468c01a57c439a444e1bc12c2138e6ba">00082</a> <span class="preprocessor"></span><span class="preprocessor">    #define warning WLog::Record(W_LEVEL_WARNING, __LINE__, _FUNCTION_NAME_, __FILE__)</span>
<a name="l00083"></a><a class="code" href="WLogInterface_8h.html#13c5f5a1374c11e78b0931ed2b5fcc6f">00083</a> <span class="preprocessor"></span><span class="preprocessor">    #define notice WLog::Record(W_LEVEL_NOTICE, __LINE__, _FUNCTION_NAME_, __FILE__)</span>
<a name="l00084"></a><a class="code" href="WLogInterface_8h.html#0c5e59a7caaa02f887d077eaa467f209">00084</a> <span class="preprocessor"></span><span class="preprocessor">    #define error WLog::Record(W_LEVEL_ERROR, __LINE__, _FUNCTION_NAME_, __FILE__)</span>
<a name="l00085"></a><a class="code" href="WLogInterface_8h.html#376d6dc5d2ccfed0a99c3d88a107a702">00085</a> <span class="preprocessor"></span><span class="preprocessor">    #define wassert(condition) ((!!(condition)) || ((WLog::Record(W_LEVEL_ASSERT, __LINE__, _FUNCTION_NAME_, __FILE__)("%s", #condition)),0))   </span>
<a name="l00086"></a><a class="code" href="WLogInterface_8h.html#eb6ad588d9fde043f5a7ae20aef48e8c">00086</a> <span class="preprocessor"></span><span class="preprocessor">    #define fatal WLog::Record(W_LEVEL_FATAL, __LINE__, _FUNCTION_NAME_, __FILE__)</span>
<a name="l00087"></a><a class="code" href="WLogInterface_8h.html#e04293253b669ea7b9882c968030eeed">00087</a> <span class="preprocessor"></span><span class="preprocessor">    #define output WLog::Record(W_LEVEL_OUTPUT, __LINE__, _FUNCTION_NAME_, __FILE__)</span>
<a name="l00088"></a>00088 <span class="preprocessor"></span>}
<a name="l00089"></a>00089 
<a name="l00090"></a>00090 <span class="preprocessor">#endif //_WLOG_WLOGINTERFACE_H_</span>
</pre></div></div>
<hr>
<address style="align: right;">
  Generated on Mon Apr 6 21:08:12 2009 for WLog by 韦体东<img src="logo.png" align="middle"/></address>
</body>
</html>
